
<style>
    .item-title{
        padding-top: 7px;
        display: inline-table;
        margin-left: 10px;
        margin-right: 10px;
    }
    #c-desc{
        width: 300px!important;
    }
    #c-xieyi{
        width: 300px!important;
    }

    #c-zhifu{
        width: 300px!important;
    }

    .repay-dict{
        display: none;
    }

</style>
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    {:input_token()}

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">用户信息:</label>
        <div class="col-xs-12 col-sm-8">
            <label  class="control-label" ><b>{$row.username} {$row.mobile}</b></label>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">操作类型:</label>
        <div class="col-xs-12 col-sm-8">

            <select  id="c-opertype" data-rule="required" class="form-control selectpicker" name="row[opertype]">
                <option value="1">充值</option>
                <option value="2">退款</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">会员等级:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-level" data-rule="required" class="form-control selectpicker" name="row[level]">
                {foreach name="userlevellabellist" item="vo"}
                <option value="{$key}" {in name="key" value="$row['level']"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">会员时长:</label>
        <div class="col-xs-12 col-sm-8">
            <label  class="control-label" style="margin-bottom: 10px">当前剩余<span style="color: red">{$row['vip_time']}</span>天，到期时间:{$row.vip_time_str}</label></br>
           <span class="item-title" style=" display: inline-table;"><span class="pay-dict">充入</span> <span class="repay-dict">扣除</span></span> <input id="c-desc"  data-rule="required"  style="width: 300px" class="form-control" name="row[vip_day]" type="number"><span class="item-title" style=" display: inline-table;">天</span>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">协议份数:</label>
        <div class="col-xs-12 col-sm-8">
            <label  class="control-label" style="margin-bottom: 10px">当前剩余<span style="color: red">{$row['xieyi']}</span>份</label></br>
            <span class="item-title"><span class="pay-dict">充入</span> <span class="repay-dict">扣除</span></span> <input id="c-xieyi"  data-rule="required"  style="width: 300px" class="form-control" name="row[xieyi]" type="number"><span class="item-title">份</span>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">金额:</label>
        <div class="col-xs-12 col-sm-8">
            <span class="item-title"><span class="pay-dict">支付</span> <span class="repay-dict">扣除</span></span> <input id="c-money" data-rule="required"  style="width: 300px"  class="form-control" name="row[money]" type="number"><span class="item-title">元</span>
        </div>
    </div>



    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>

<script src="__CDN__/assets/libs/jquery/dist/jquery.min.js"></script>
<script type="text/javascript">

    $(document).on("change", "#c-opertype", function(){
        console.log($(this).val())
        if ($(this).val()==1){
          $('.pay-dict').show();
          $('.repay-dict').hide();
        }else{
            $('.pay-dict').hide();
            $('.repay-dict').show();
        }
    })
</script>
